<?php
// Author: dolphinigle
// 28 March 2012
include 'config/koneksi.php';

if ($_GET[type] == 'countall') {
  $query = "SELECT COUNT(id_komentar) AS cnt FROM komentar " .
           "WHERE id_berita='" . $_GET[id] . "'";
  $sql_answer = mysql_query($query);
  $ans = mysql_fetch_array($sql_answer);
  
  echo $ans[cnt];
} else {
  exit('UNRECOGNIZED TYPE PARAMETER');
}
?>
